Hotmail/Outlook IMAP and POP3 Email Receiving Guide: Password Login and OAuth2.0 Token Login

Published Jun 24, 20260 min readUpdated Jun 24, 2026View Count 3

This guide explains how to receive Hotmail/Outlook emails using IMAP and POP3, including password-based IMAP login and OAuth2.0 token login with Refresh Token and Client ID. It covers IMAP server settings for short-term accounts, premium short-term accounts, and long-term IMAP-enabled accounts, with Python examples for IMAP password login, IMAP OAuth2.0 login, and POP3 OAuth2.0 login. This article is suitable for users who need bulk purchasing Hotmail accounts, Outlook accounts wholesale, verification email retrieval, platform registration email receiving, and automated mailbox management.

Hotmail/Outlook emails can be received through IMAP or POP3. For verification email retrieval, platform registration emails, bulk mailbox management, and automated email receiving, choosing the right account type and login method is important.

If you need bulk purchasing Hotmail accounts, buy Outlook accounts, Hotmail accounts wholesale, or Outlook accounts wholesale, Hotmail007 provides email accounts that support different receiving methods, helping users manage email receiving and account operations according to their business needs.

In This Article

  1. Hotmail/Outlook IMAP and POP3 email receiving methods

  2. Password login for IMAP

  3. OAuth2.0 token login for IMAP/POP3

  4. How to choose between the two methods

  5. Important notes

1. Hotmail/Outlook IMAP and POP3 Email Receiving Methods

IMAP and POP3 are common email receiving protocols used to read emails through clients, scripts, or third-party email receiving tools.

IMAP is more suitable for continuously reading and managing mailbox emails. It can connect to the inbox, read email lists, and keep email status on the mailbox server, making it suitable for verification email retrieval, platform registration email receiving, bulk mailbox receiving, and automated management.

POP3 is more focused on pulling email content from the server for local processing. For scenarios that only require retrieving email content, POP3 can also be used as an email receiving method.

For Hotmail/Outlook accounts with IMAP support from Hotmail007, users can choose different IMAP/POP3 receiving methods according to the account type:

  • Password IMAP: use the email address and password to receive emails through the corresponding IMAP domain

  • OAuth2.0 IMAP/POP3: use Refresh Token and Client ID for authorized email receiving

Short-term accounts and premium short-term accounts mainly use password IMAP. Long-term IMAP accounts can use both password IMAP and OAuth2.0 token login.

If you want to learn about Microsoft Graph (OAuth2.0) email receiving, you can also refer to: Hotmail/Outlook Graph (OAuth2.0) Email Receiving Guide

2. Password Login for IMAP

Password login for IMAP is the most direct email receiving method. Users only need the email address, email password, corresponding IMAP domain, and port to connect to the mailbox and receive emails.

If a long-term IMAP account uses password login for IMAP, it will not be affected by Refresh Token expiration. As long as the account itself remains active, it can continue receiving emails through IMAP with the email address and password.

2.1 Short-Term Account IMAP Settings

Applicable accounts: short-term accounts, including:

Use the following IMAP server:

IMAP Address: fresh-imap.zmailservice.com
SSL/TLS Port: 993
No Encryption Port: 143



2.2 Long-Term Account IMAP Settings

Applicable accounts: long-term accounts (IMAP type), including:

Use the following IMAP server:

IMAP Address: imap.zmailservice.com
SSL/TLS Port: 993
No Encryption Port: 143

If using SSL/TLS encrypted connection, choose port 993.
If using no encryption, choose port 143.

2.3 Python Example: Password Login for IMAP

The following is a Python example using imapclient for IMAP password login.

imapclient is a Python IMAP client library used to connect to an IMAP mail server, log in to the mailbox, select folders, and read emails. If it is not installed in your environment, install it first:

pip install imapclient

Python example:

import imapclient

imap_server = "imap.zmailservice.com"  # For short-term accounts, use fresh-imap.zmailservice.com
imap_port = 143

username = "[email protected]"
password = "your_password"

imap_obj = imapclient.IMAPClient(
    imap_server,
    use_uid=True,
    port=imap_port,
    ssl=False
)

imap_obj.login(username, password)
imap_obj.select_folder("INBOX")

print("IMAP login successful.")

If using SSL/TLS connection, change to:

imap_port = 993
ssl = True

In actual use, choose the correct IMAP domain and port according to the account type.

3. OAuth2.0 Token Login for IMAP/POP3

OAuth2.0 token login is suitable for long-term IMAP accounts. Unlike password login, this method first uses Refresh Token to obtain access permission, then connects to the official Outlook IMAP or POP3 server to read emails.

Hotmail007 related accounts usually include the following format:

email:password:refreshToken:clientId

Fields:

  • Email: Hotmail or Outlook email address

  • Password: email password

  • Refresh Token: used to obtain access permission

  • Client ID: used to identify the authorized application

Access Token is temporarily obtained through Refresh Token during program execution, and ordinary users do not need to prepare it separately.

3.1 IMAP OAuth2.0 Python Example

To read Hotmail/Outlook emails through IMAP, you can use Refresh Token and Client ID to obtain access permission, then connect to IMAP through XOAUTH2 authentication.

import imaplib
import requests


def get_access_token(client_id, refresh_token):
    data = {
        "client_id": client_id,
        "grant_type": "refresh_token",
        "refresh_token": refresh_token
    }

    response = requests.post(
        "https://login.live.com/oauth20_token.srf",
        data=data
    )

    response.raise_for_status()
    return response.json()["access_token"]


def generate_auth_string(user, token):
    return f"user={user}\1auth=Bearer {token}\1\1"


def connect_imap(email, access_token):
    mail = imaplib.IMAP4_SSL("outlook.office365.com")

    auth_string = generate_auth_string(email, access_token)
    mail.authenticate(
        "XOAUTH2",
        lambda x: auth_string.encode("utf-8")
    )

    mail.select("INBOX")
    status, messages = mail.search(None, "ALL")

    print("Email IDs:", messages)

    mail.logout()


client_id = "your_client_id"
email = "[email protected]"
refresh_token = "your_refresh_token"

access_token = get_access_token(client_id, refresh_token)
connect_imap(email, access_token)


3.2 POP3 OAuth2.0 Python Example

To read emails through POP3, you can use Refresh Token to obtain Access Token, then connect to the Outlook POP3 server.

import base64
import poplib
import requests


def get_access_token(client_id, refresh_token):
    data = {
        "client_id": client_id,
        "grant_type": "refresh_token",
        "refresh_token": refresh_token
    }

    response = requests.post(
        "https://login.live.com/oauth20_token.srf",
        data=data
    )

    response.raise_for_status()
    return response.json()["access_token"]


def generate_auth_string(user, token):
    return f"user={user}\1auth=Bearer {token}\1\1"


def connect_pop3(email, access_token):
    pop3_server = "outlook.office365.com"
    pop3_port = 995

    server = poplib.POP3_SSL(pop3_server, pop3_port)

    auth_string = generate_auth_string(email, access_token)
    encoded_auth_string = base64.b64encode(
        auth_string.encode("utf-8")
    ).decode("utf-8")

    server._shortcmd("AUTH XOAUTH2")
    server._shortcmd(encoded_auth_string)

    num_messages = len(server.list()[1])
    print(f"There are {num_messages} emails in the inbox.")

    for i in range(num_messages):
        response, lines, octets = server.retr(i + 1)
        msg_content = b"\n".join(lines).decode("utf-8", errors="ignore")
        print(f"Email {i + 1}:")
        print(msg_content)
        print("=" * 50)


client_id = "your_client_id"
email = "[email protected]"
refresh_token = "your_refresh_token"

access_token = get_access_token(client_id, refresh_token)
connect_pop3(email, access_token)


4. How to Choose Between the Two Methods

If you are using a short-term account or premium short-term account, it is recommended to use the email address and password to connect to IMAP with the short-term account IMAP domain:

fresh-imap.zmailservice.com

If you are using a long-term IMAP account, you can use the email address and password to connect to IMAP with the long-term account IMAP domain:

imap.zmailservice.com

If you are using a long-term IMAP account, you can also use Refresh Token and Client ID to connect to IMAP/POP3 through OAuth2.0.

In short:

  • Short-term accounts: email password + fresh-imap.zmailservice.com

  • Long-term IMAP accounts: email password + imap.zmailservice.com

  • Long-term IMAP accounts with OAuth2.0: Refresh Token + Client ID for IMAP/POP3

  • Bulk purchasing Hotmail accounts or Outlook accounts wholesale: choose the account type that supports the required receiving method

5. Important Notes

When using IMAP/POP3 to receive emails, check the following information:

  • Whether the account type supports IMAP or OAuth2.0

  • Whether short-term accounts and premium short-term accounts use fresh-imap.zmailservice.com

  • Whether long-term IMAP accounts use imap.zmailservice.com

  • Whether the port is correct

  • Whether SSL/TLS settings match the port

  • Whether the email and password are correct

  • Whether Refresh Token and Client ID are complete

  • Whether Refresh Token is still valid

  • Whether the network environment is stable

  • Whether the OAuth2.0 code correctly uses XOAUTH2 authentication

For OAuth2.0, Refresh Token is usually valid for about 3 months from creation, depending on the actual authorization status of the account. If the Token expires or becomes invalid, you need to replace it with a valid Token or obtain new authorization information.

Conclusion

Hotmail/Outlook emails mainly have two common receiving methods: password login for IMAP, and OAuth2.0 login for IMAP/POP3 using Refresh Token and Client ID.

Short-term accounts and premium short-term accounts are suitable for password IMAP with fresh-imap.zmailservice.com. Long-term IMAP accounts are suitable for password IMAP with imap.zmailservice.com, and can also use Refresh Token and Client ID for IMAP/POP3.

If you need bulk purchasing Hotmail accounts, Hotmail accounts wholesale, buy Outlook accounts, Outlook accounts wholesale, or email accounts that support IMAP, POP3, OAuth2.0, Refresh Token, and Client ID, Hotmail007 can provide suitable account options and email receiving support.

Related Tutorials

Was this guide helpful?

Back to All Tutorials

Start Your Professional Trial

Hotmail007 offers low prices and excellent service for purchasing Hotmail and Outlook accounts. Bulk purchases are even cheaper. Choose from a variety of account types to suit your workflow.

H
Hotmail007

Welcome to Hotmail007! We offer low prices and excellent service for purchasing Hotmail and Outlook accounts. Bulk purchases are even cheaper. Choose from a variety of Hotmail and Outlook email types to suit your needs.

©2026 - copyright